package cn.jietuo.builder;

/**
 * @author zhangx & jietuo_zx@163.com
 * @version 1.0
 * @date 2021/3/7
 * @description:
 */
public class Director {

    private ProductBuilder builder;

    public Director(ProductBuilder builder){
        this.builder = builder;
    }

    public Product makeProduct(String productName,String companyName,String part1,String part2){
        builder.builderProductName(productName);
        builder.builderProductCompanyName(companyName);
        builder.builderPart1(part1);
        builder.builderPart2(part2);
        Product build = builder.build();
        return build;
    }
}
